package coffee;
public class OrderItem {
   int quantity;
   Product product;
   public OrderItem(Product initialProduct, int initialQuantity)
   {
	   this.product=initialProduct;
	   this.quantity=initialQuantity;
   }
   public Product getProduct()
   {
	   return product;
   }
   public int getQuantity()
   {
	   return quantity;
   }
   public void setQuantity(int newQuantity )
   {
	  this.quantity=newQuantity;
   }
   public double getValue()
   {
	   return quantity*product.price;
   }
   public String toString()
   {
	   return quantity + " " +product.code+ " " +product.price;
   }
}
